home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Frontier 4.2.3 / Desktop Scripts / Read Me next >
Text File  |  1997-01-21  |  15KB  |  268 lines

  1. <!--#htmlHints
  2. #version "1"
  3. #adrObject "suites.userland.readmeSite.desktopScripts"
  4. #netAddress "255.255.255.255"
  5. #objectCreated "1/21/97; 10:21:28 AM"
  6. #objectModified "1/21/97; 10:28:49 AM"
  7. #lastBuildTime "1/21/97; 10:28:55 AM"
  8. #docs "http://www.scripting.com/midas/htmlHints.html"
  9. -->
  10. <html>
  11. <head>
  12. <title>Desktop Scripts</title>
  13. <meta name="generator" content="Frontier 4.2 Mac">
  14. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  15. </head>
  16. <body alink="#008000" bgcolor="#FFFFFF" link="#0000FF" vlink="#800080">
  17. <code>
  18.     1/21/97; 10:28:56 AM Pacific
  19.     </code>
  20. <h2>
  21.     <i>
  22.         Desktop Scripts
  23.         </i>
  24.     </h2>
  25. <blockquote>
  26.     <FONT SIZE=+2><b>H</b></FONT>ere's what you need to know if you're beginning your exploration of Frontier through the Desktop Scripts folder: <p>
  27.  
  28. o To cancel a script, press cmd-period. Be sure Frontier is the frontmost application when you press cmd-period.<p>
  29.  
  30. o When Frontier runs a desktop script, it provides a single piece of information to the script -- the full path of the folder it was launched from. Therefore desktop scripts can be written generally to operate on the folder that the user has dragged it into. Many of the samples in this folder operate on the folders they were launched from.<p>
  31.  
  32. o To view the source code of a desktop script, hold down the cmd-key as you double-click on the file. Be sure to hold down the cmd-key until the window opens in Frontier.<p>
  33.  
  34. o If you modify a script and want to save the changes back to the file, press cmd-3 with the script's window in front.<p>
  35.  
  36. More information is in <a href="http://www.scripting.com/frontier/manual/chapter02.html">Chapter 2</a> of the manual.<p>
  37.  
  38. Following is a brief description of each of the scripts in the Desktop Scripts folder:<p>
  39.  
  40. <b>Backup Folder</b><p>
  41.  
  42. Copy this script into a folder on your hard disk and double-click on it to create a backup sub-folder.<p>
  43.  
  44. First it scans the folder, looking for folders with names like "backup #xxx". What's the highest number? Suppose it's 4.<p>
  45.  
  46. The script creates a new sub-folder named "backup #5" and copies all files and sub-folders in the folder into the new folder. It does not copy other backup folders into the new backup folder.<p>
  47.  
  48.  
  49. <b>Big Folders Chart</b><p>
  50.  
  51. Copy this script into a folder and double-click on it to get a visual display of the relative sizes of its sub-folders.<p>
  52.  
  53. The script launches the BarChart application (bundled with Frontier, in the UserLand Utilities folder).<p>
  54.  
  55. As it travels thru the folder, the script sends IAC messages to BarChart to display the folder sizes.<p>
  56.  
  57. BarChart remains the frontmost application so the user can view the resulting chart.<p>
  58.  
  59.  
  60. <b>Count Files</b><p>
  61.  
  62. This very simple script counts the files in the current folder and displays the result in a dialog box.<p>
  63.  
  64.  
  65. <b>Count Word Files</b><p>
  66.  
  67. This script travels thru the folder it was launched from searching for text files created by Microsoft Word.<p>
  68.  
  69. The result is reported in a dialog box.<p>
  70.  
  71. The script only counts files whose creator ID is 'MSWD'.<p>
  72.  
  73. This script is explained in detail on pages 31-35 in the Frontier User Guide.<p>
  74.  
  75.  
  76. <b>Delete Packages</b><p>
  77.  
  78. This script traverses the whole folder it was launched from, looking for AppleLink "package" files. If you're an active AppleLink user, we bet that you have a couple of megabytes of disk space tied up storing random AppleLink downloads. This script saves you the trouble of manually opening and closing folders to delete files that you may not need.<p>
  79.  
  80. When it finds a package file, the script displays a dialog asking if you want to delete it. Click on Yes to delete it, No to not delete it, or Cancel to halt the traversal. <p>
  81.  
  82. Special feature: Hold down the option key while clicking on Yes to delete all subsequent AppleLink package files without confirmation.<p>
  83.  
  84. Note: AppleLink package files are identified by their file type ('HBSF') and creator ('GEOL').<p>
  85.  
  86. Note: This script could be extended to delete all kinds of nuisance files that take up disk space unnecessarily.<p>
  87.  
  88.  
  89. <b>Find In File...</b><p>
  90.  
  91. This script searches all the files in the folder it was launched from for a string you type into its dialog box.<p>
  92.  
  93. It remembers the last string you typed, you're offered that string as a default in the dialog.<p>
  94.  
  95. The script uses Frontier's built-in "file.findInFile" verb. It searches all files in the folder, and in all sub-folders for the string you entered. <p>
  96.  
  97. It looks in files of all types -- the script could easily be modified to only look in text files, or picture files. Or files modified since January 1, 1992...<p>
  98.  
  99. When a match is found, the script offers you a chance to open the file, continue the search, or stop searching. If you choose to open the file, the application that created it is launched, and it is instructed to open the file you selected.<p>
  100.  
  101. If you hold down the Control key while launching the script, it presents a standard file dialog allowing you to select the folder to search in. You could modify the script to always display the dialog, allowing you to launch this script from the Finder desktop level or from the Apple menu.<p>
  102.  
  103. Note: file.findInFile only looks in the data forks of files, therefore this script can't find a match in the resource fork. That means you can't use this script to search Frontier desktop scripts, which store the text of the script in the resource fork. Ouch!<p>
  104.  
  105. <b>Find Locked Files</b><p>
  106.  
  107. This script traverses the whole folder it was launched from, looking for locked files.<p>
  108.  
  109. When it finds one, it displays a dialog asking if you want to unlock a specific file. Click on Yes to unlock it, No to not unlock it, or Cancel to halt the traversal. <p>
  110.  
  111. Special feature: Hold down the option key while clicking on Yes to unlock all subsequent files without confirmation.<p>
  112.  
  113.  
  114. <b>Folder Structure</b><p>
  115.  
  116. This script creates an indented outline that exactly mirrors the hierarchic structure of the folder it was launched from.<p>
  117.  
  118. The outline is created in your Frontier "people" table. If your initials are XX, the outline is called people.XX.list. The script automatically creates and opens the outline. You can watch it being built as the script runs.<p>
  119.  
  120. The main head of the outline is the full path to the folder being traversed. Each first-level headline is a file or folder in that folder. Indented under each folder is a full traversal of all its files and folders.<p>
  121.  
  122. Of course you can copy this outline, or a portion of it, and paste it into a word processor, outliner or page layout program.<p>
  123.  
  124. Note: this script overwrites any existing list without confirmation. If you want to save a list, rename it in the object database before continuing. To open the table containing the list, double-click in the title-bar of people.XX.list.<p>
  125.  
  126.  
  127. <b>Free Space Chart</b><p>
  128.  
  129. This script shows you how much space is free on all mounted disk volumes. <p>
  130.  
  131. It doesn't matter what folder you launch this script from, it ignores the "path" argument that Frontier provides. <p>
  132.  
  133. Suggestion: put an alias of this script into your Apple Menu Items folder in your System Folder.<p>
  134.  
  135. The script launches the BarChart application and sends it IAC messages to display the amount of free space on each volume.<p>
  136.  
  137. BarChart remains the frontmost application so the user can view the resulting chart.<p>
  138.  
  139.  
  140. <b>Gather App Aliases...</b><p>
  141.  
  142. This script creates a new folder full of aliases to application files.<p>
  143.  
  144. When it starts up, the script asks you to select a folder to search. If you click on Cancel, the script exits.<p>
  145.  
  146. It then creates a new folder named "App Aliases" in the folder that the script was launched from.  If the folder already exists it is deleted without confirmation. The newly created folder is opened.<p>
  147.  
  148. The script traverses the folder you selected and creates an alias of every application it finds. An application is identified by it's file type -- 'APPL'.<p>
  149.  
  150. This script can be modified to create aliases of any kind of file, based on any of the criteria that Frontier has verbs to handle.<p>
  151.  
  152. It may make sense to put this script on your desktop (the App Aliases folder will be created at the desktop level), or in the Apple Menu Items folder.<p>
  153.  
  154. Use this script to do research on CD's you receive from Apple and others, modify it to search for the kinds of files you're interested in. You'll be surprised what you find!<p>
  155.  
  156.  
  157. <b>Icon Sorter</b><p>
  158.  
  159. This script cleans up the icons of all the files and folders in the folder it was launched from.<p>
  160.  
  161. First it "visits" all the files in alphabetic order, then all the folders in alphabetic order. The icons are arranged three to a line, spaced fairly far apart, allowing space for long names.<p>
  162.  
  163. It then treats all sub-folders and sub-sub-folders in the same way.<p>
  164.  
  165. Note: you will not see the new icon positions until the folder is closed and re-opened. This is a feature of the System 7.0 Finder, we're not aware of any way to work around this limitation.<p>
  166.  
  167. Note: you cannot change the icon position of a busy file. Quit from all applications in the folder before running the script. This means that the only way to use this script to clean up the Frontier folder is to make a copy of Frontier and run this script using the copy.<p>
  168.  
  169. Note: This script is easily customized to space icons differently, and to allocate more or less than three icons per line.<p>
  170.  
  171. <b>Open Folder...</b><p>
  172.  
  173. This is a very simple, but very useful script. It opens a standard file dialog, asking you to select a folder to open.<p>
  174.  
  175. Select a folder and click on the Folder button. An IAC message is sent to the Finder telling it to open the folder.<p>
  176.  
  177. It doesn't matter what folder you launch this script from, it ignores the "path" argument that Frontier provides. Suggestion: place this script at the desktop level.<p>
  178.  
  179. This script is especially useful in conjunction with Boomerang, part of the Now Utilities, from Now Software.<p>
  180.  
  181. <b>Recently Changed Files...</b><p>
  182.  
  183. This script creates a folder full of aliases of files that have changed recently. What's recent? That's up to you...<p>
  184.  
  185. It displays a dialog asking you to enter a date, suggesting October 1, 1991 as a default. Enter a date in the same format you see, and click on OK to proceed, Cancel to exit the script.<p>
  186.  
  187. The script traverses the folder it was launched from, and creates aliases of all the files changed since the date you entered. The aliases are created in a folder named "Recently Changed Files," which is overwritten without confirmation.<p>
  188.  
  189. When it's finished, the script opens the Recently Changed Files folder.<p>
  190.  
  191. This script is explained in detail on pages 35-38 in the Frontier User Guide.<p>
  192.  
  193. <b>Why Frontier</b><p>
  194.  
  195. This script brings Frontier to the front, and opens the object database window at helptext.whyfrontier.<p>
  196.  
  197. This window contains an outline of features/benefits for Frontier. We like to have this file readily available at trade shows. We thought you might find it useful if you're giving a demo of Frontier to someone else.<p>
  198.  
  199.  
  200. <b>'Powerful' Scripts:App Cleaner</b><p>
  201.  
  202. This script searches a disk for duplicates of an application.<p>
  203.  
  204. It first prompts you for a creator ID of the application you want to search for. Then it asks you to select a folder to search in, suggesting the folder that the script was launched from.<p>
  205.  
  206. It searches for applications that have the creator ID that you entered. When it finds one, it asks whether you want to change the application ID. If you click on Yes, the ID is changed to '----'. If you click on No, the file's ID isn't changed. Click on Cancel to exit the script.<p>
  207.  
  208. This script is useful when you receive a new version of an application and want to be sure that you can double-click on data files and have the correct version launch. Make sure not to change the ID of the real copy of the program.<p>
  209.  
  210. This is a very powerful script, but it can be hard to undo its effects. Be sure you know what you're doing before you run the script.<p>
  211.  
  212. We wrote this script for Frontier beta sites, who may want to keep old Frontiers around, but want to be sure the current one is the one the Finder recognizes. Frontier's creator ID is 'LAND'.<p>
  213.  
  214.  
  215. <b>'Powerful' Scripts:Icon Stealer</b><p>
  216.  
  217. This script searches the folder it was launched from, copying icon resources from all the files it encounters.<p>
  218.  
  219. It copies resources of type 'ICON', 'ICN#' and 'icl8'.<p>
  220.  
  221. The icons are copied into a file it creates named "Stolen Icons" in the folder the script was launched from, if it doesn't exist. If it does exist, the icons are added to the existing file. <p>
  222.  
  223. When it's finished searching, it either displays a dialog if no icons were found, or it opens the output file if icons were found.<p>
  224.  
  225. This script can easily be modified to grab resources of different types.<p>
  226.  
  227.  
  228. <b>'Powerful' Scripts:Set Mod Dates</b><p>
  229.  
  230. This script visits all the files in the folder it was launched from, setting the modification dates to a specific time.<p>
  231.  
  232. You are prompted for the date and time, the current date and time is suggested as a default. Enter the date/time in the same format as it appears in the dialog box.<p>
  233.  
  234. Some commercial software developers like to have the modification dates of all files in their shipping folder be identical. This script makes it easy for you to do it too.<p>
  235.  
  236. The script could easily be extended to change the creation date also.<p>
  237.  
  238. <b>Word Scripts:Delete Word Backups</b><p>
  239.  
  240. This script traverses the whole folder it was launched from, looking for Microsoft Word backup files. This script saves you the trouble of manually opening and closing folders to delete files that you may not need.<p>
  241.  
  242. When it finds a Word backup file, the script displays a dialog asking if you want to delete it. Click on Yes to delete it, No to not delete it, or Cancel to halt the traversal. <p>
  243.  
  244. Special feature: Hold down the option key while clicking on Yes to delete all subsequent Word backup files without confirmation.<p>
  245.  
  246. Note: Word backup files are identified by their file type ('WDBN') and creator ('MSWD'), and the fact that the file name begins with "Backup of".<p>
  247.  
  248. <b>Word Scripts:New Press Release...</b><p>
  249.  
  250. We use this script whenever we need to write a new press release.<p>
  251.  
  252. First, the user is prompted for the title of the press release. The last title entered into the dialog is offered as a default response.<p>
  253.  
  254. A new folder with the title you entered is created. A copy of the "Press Release Template" file is copied into the folder, and given the name "press release.1". Subsequent revisions to the file should be saved as "press release.2" and so on.<p>
  255.  
  256. The script launches Microsoft Word, instructing it to open the  press release.1 file.<p>
  257.  
  258. This script shows how you can use Frontier to establish a standard procedure for writing new documents, simplifying a complex set of operations.<p>
  259.  
  260.     </blockquote>
  261. <h2>
  262.     <i>
  263.         Thanks for checking out Frontier!
  264.         </i>
  265.     </h2>
  266. </body>
  267. </html>
  268.